﻿ <%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<link href="<%=request.getContextPath() %>/static/common/plugin/bootstrap-3.3.5/css/bootstrap.min.css" rel="stylesheet" type="text/css" />
<link href="<%=request.getContextPath() %>/static/common/plugin/toastr/toastr.css" rel="stylesheet" type="text/css" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>信息管理系统界面</title>
</head>
<frameset rows="88,*" cols="*" frameborder="no" border="0" framespacing="0">
  <frame src="<%=request.getContextPath() %>/ApplicationServlet?command=top" name="topFrame" scrolling="no" noresize="noresize" id="topFrame" title="topFrame" />
  <frameset cols="187,*" frameborder="no" border="0" framespacing="0">
    <frame src="<%=request.getContextPath() %>/ApplicationServlet?command=left" name="leftFrame" scrolling="no" noresize="noresize" id="leftFrame" title="leftFrame" />
    <frame src="<%=request.getContextPath() %>/ApplicationServlet?command=index" name="rightFrame" id="rightFrame" title="rightFrame" />
  </frameset>
</frameset>
<body>
 <table class="table" >
   <thead>
		<tr>
			<th>编号</th>
			<th>帐号</th>
			<th>姓名</th>
			<th>电话</th>
			<th>邮箱</th>
			<th>年龄</th>
			<th>性别</th>
			<th>爱好</th>
		</tr>
	</thead>
	<tbody>
		<c:forEach items="${studentMessage }" var="studentMessage" varStatus="v">
			<tr>
				<th scope="row">${v.count }</th>
				<td>${studentMessage.code }</td>
				<td>${studentMessage.password }</td>
				<td>${studentMessage.name}</td>
				<td>${studentMessage.phone }</td>
				<td>${studentMessage.email }</td>
				<td>${studentMessage.age}</td>
				<td>
					<c:if test="${studentMessage.gender == 1 }">
						${studentMessage.gender }
					</c:if>
					<c:if test="${studentMessage.gender != 1 }">
						${studentMessage.gender }
					</c:if>
				</td>
				<td>${studentMessage.hobby}</td>
				<td><a
					href="<%=request.getContextPath()%>/ApplicationServlet?command=delete&id=${application.id}"
					onclick="return confirm('是否删除？');">删除</a>
				</td>
			</tr>
		</c:forEach>
		<tr>
			<td colspan="7" align="right">
				<a href="<%=request.getContextPath()%>/ApplicationServlet?command=listTalentApplyByPage&pageNo=${pageModel.first}">首页</a>&nbsp;
				<a href="<%=request.getContextPath()%>/ApplicationServlet?command=listTalentApplyByPage&pageNo=${pageModel.pre}">上一页</a>&nbsp;
				第<select onchange="goPage(this)">
				 	<script>
				 		var pageNo = '${pageModel.pageNo }';
				 		var totalPage = '${pageModel.totalPage }';
				 		for (var i = 1; i <= totalPage; i++) {
				 			if (pageNo == i) {
				 				document.write('<option value="' + i + '" selected="selected">' + i + '</option>');
				 			} else {
				 				document.write('<option value="' + i + '">' + i + '</option>');
				 			}
				 		}
				 	</script>
				 </select>页
				,共${pageModel.totalPage }页&nbsp;
				<a href="<%=request.getContextPath()%>/ApplicationServlet?command=listTalentApplyByPage&pageNo=${pageModel.next}">下一页</a>&nbsp;
				<a href="<%=request.getContextPath()%>/ApplicationServlet?command=listTalentApplyByPage&pageNo=${pageModel.last}">尾页</a>&nbsp;
				共${pageModel.allRecords }条记录
			</td>
		</tr>
	</tbody>
</table>
<script>
var tr = $('tr:gt(0)');
tr.click(function() {
	var preBackgroundColor = $(this).css('background-color');
	if (preBackgroundColor == 'rgb(18, 52, 86)') {
		$(this).css('background', 'gray');
	} else {
		$(this).css('background', 'rgba(0, 0, 0, 0)');
	}
}).mouseover(function() {
	 var preBackgroundColor = $(this).css('background-color');
	 if (preBackgroundColor != 'rgb(128, 128, 128)') {
	 	$(this).css('background', '#C0D9D9 48')
	 }
 }).mouseout(function(){
	 var preBackgroundColor = $(this).css('background-color');
	 if (preBackgroundColor != 'rgb(128, 128, 128)') {
		$(this).css('background', 'white')
	 }
 })
</script>
</body>

</html> 
